﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using Abp.Modules;

namespace Xugege.AbpExtension.Application.Extension
{

    [DependsOn(typeof(AbpZeroTemplateApplicationModule))]
    public class AbpZeroTemplateApplicationExtensionModule : AbpModule
    {
        public override void Initialize()
        {
            IocManager.RegisterAssemblyByConvention(Assembly.GetExecutingAssembly());
        }


        public override void PostInitialize()
        {
            
            Configuration.Caching.Configure(ApplicationExtensionConsts.UserListCacheName, cache =>
            {
                cache.DefaultAbsoluteExpireTime = TimeSpan.FromHours(1);

            });
            Configuration.Caching.Configure(ApplicationExtensionConsts.OrgUnitListCacheName, cache =>
            {
                cache.DefaultAbsoluteExpireTime = TimeSpan.FromHours(1);

            });
        }
    }
}
